<template>
	<div class="help">
		<div class="cell">
			<van-cell @click="issueDetail(issue.id)" :border="false" :title="issue.name" v-for="(issue, issuei) in list" :key="issuei" is-link />
		</div>
		<div class="link-serve">
			<div class="link-serve-btn" @click="$router.push('/member-service')">
				联系客服
			</div>
		</div>
	</div>
</template>
<script>
export default {
	data() {
		return {
			list: [],
			parentList: [
				[
					{
						name: '为什么有隐藏券？',
						icon: 'subsidy-help'
					},
					{
						name: '同一款产品优惠券券能领取几次？',
						icon: 'subsidy-help'
					},
					{
						name: '商品优惠券会过期吗？',
						icon: 'subsidy-help'
					},
					{
						name: '电商平台所有的产品都有隐藏券么？',
						icon: 'subsidy-help'
					},
					{
						name: '优惠券为什么显示领取上限？',
						icon: 'subsidy-help'
					},
					{
						name: '领券下单又申请退款后，还能领取优惠券么？',
						icon: 'subsidy-help'
					}
				],
				[
					{
						name: '什么是现金补贴？',
						icon: 'subsidy-help'
					},
					{
						name: '如何获得现金补贴？',
						icon: 'subsidy-help'
					},
					{
						name: '补贴金额如何计算？',
						icon: 'subsidy-help'
					},
					{
						name: '什么情况下，会没有现金补贴？',
						icon: 'subsidy-help'
					},
					{
						name: '购买了本平台补贴商品，补贴什么时候到账？',
						icon: 'subsidy-help'
					},
					{
						name: '为什么我获得的补贴与购买时显示的不一致？',
						icon: 'subsidy-help'
					}
				],
				[
					{
						name: '为什么下单后，没有显示？',
						icon: 'subsidy-help'
					},
					{
						name: '有订单笔数却没有收益显示？',
						icon: 'subsidy-help'
					},
					{
						name: '已签收的订单，为什么会失效？',
						icon: 'subsidy-help'
					}
				],
				[
					{
						name: '提现规则',
						icon: 'subsidy-help'
					}
				],
				[
					{
						name: '购买预售商品获得补贴的正确下单流程',
						icon: 'subsidy-help'
					},
					{
						name: '预售商品无法获得补贴的情形',
						icon: 'subsidy-help'
					},
					{
						name: '预售商品优惠券使用门槛怎么计算？',
						icon: 'subsidy-help'
					},
					{
						name: '预售商品的补贴到账时间',
						icon: 'subsidy-help'
					},
					{
						name: '为什么预售商品的补贴金额和商品详情页不一致？',
						icon: 'subsidy-help'
					}
				],
				[
					{
						name: '退货退款/部分退款/售后维权，还有补贴么？',
						icon: 'subsidy-help'
					},
					{
						name: '发生维权退款的订单已发放的集分宝会如何处理？',
						icon: 'subsidy-help'
					},
					{
						name: '欠款用户有什么影响？',
						icon: 'subsidy-help'
					},
					{
						name: '什么情况会导致补贴延迟到账？（包含但不仅限于以下情形）',
						icon: 'subsidy-help'
					}
				]
			]
		};
	},
	methods: {
		issueDetail(id) {
			this.$router.push('/member-help-detail?id=' + id);
		}
	},
	created() {
		const id = this.$route.query.id;
		if (!id) {
			return;
		}
		let newParentList = this.parentList.map((items, index) => {
			return items.map((item, iindex) => {
				return {
					...item,
					id: index + '' + iindex
				};
			});
		});
		this.list = newParentList[id];
	}
};
</script>
<style lang="scss" scoped>
.help {
	margin-top: 20px;
	.cell {
		width: 100%;
	}
}
.link-serve {
	width: 100%;
	height: 128px;
	line-height: 128px;
	text-align: center;
	@include flexBox(center, center);
	position: fixed;
	bottom: 0;
	.link-serve-btn {
		width: 336px;
		height: 80px;
		line-height: 80px;
		background: rgba(247, 1, 20, 1);
		border-radius: 40px;
		font-size: 28px;
		color: #ffffff;
	}
}
@supports (bottom: env(safe-area-inset-bottom)) {
	.link-serve {
		padding-bottom: env(safe-area-inset-bottom);
	}
}
</style>
